<?php



class ProductsMapBuilder implements MapBuilder {

	
	const CLASS_NAME = 'lib.model.openbravo.map.ProductsMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap(ProductsPeer::DATABASE_NAME);

		$tMap = $this->dbMap->addTable(ProductsPeer::TABLE_NAME);
		$tMap->setPhpName('Products');
		$tMap->setClassname('Products');

		$tMap->setUseIdGenerator(false);

		$tMap->addPrimaryKey('ID', 'Id', 'VARCHAR', true, 255);

		$tMap->addColumn('REFERENCE', 'Reference', 'VARCHAR', true, 255);

		$tMap->addColumn('CODE', 'Code', 'VARCHAR', true, 255);

		$tMap->addColumn('CODETYPE', 'Codetype', 'VARCHAR', false, 255);

		$tMap->addColumn('NAME', 'Name', 'VARCHAR', true, 255);

		$tMap->addColumn('PRICEBUY', 'Pricebuy', 'DOUBLE', true, null);

		$tMap->addColumn('PRICESELL', 'Pricesell', 'DOUBLE', true, null);

		$tMap->addForeignKey('CATEGORY', 'Category', 'VARCHAR', 'CATEGORIES', 'ID', true, 255);

		$tMap->addForeignKey('TAXCAT', 'Taxcat', 'VARCHAR', 'TAXCATEGORIES', 'ID', true, 255);

		$tMap->addColumn('STOCKCOST', 'Stockcost', 'DOUBLE', false, null);

		$tMap->addColumn('STOCKVOLUME', 'Stockvolume', 'DOUBLE', false, null);

		$tMap->addColumn('IMAGE', 'Image', 'BLOB', false, null);

		$tMap->addColumn('ISCOM', 'Iscom', 'VARCHAR', true, 1);

		$tMap->addColumn('ISSCALE', 'Isscale', 'VARCHAR', true, 1);

		$tMap->addColumn('ATTRIBUTES', 'Attributes', 'BLOB', false, null);

	} 
} 